<script setup>
import { ref, onMounted, toRaw } from 'vue'
import { useRoute } from 'vue-router'
import autofit from 'autofit.js'
import PageHead from '@/components/page-head/index.vue'
import { getQueryVariable } from '@/utils/comm'
import { setToken } from '@/utils/auth'

const route = useRoute()

onMounted(() => {
  const token = getQueryVariable('token')
  console.log('token', token)
  if (token) {
    setToken(token)
  }
  autofit.init({
    dh: 1080,
    dw: 1920,
    el: '#app',
    resize: true
    // ignore: ['.el-dialog']
  })
})
</script>

<template>
  <page-head />
  <div class="main">
    <RouterView />
  </div>
</template>

<style scoped lang="scss">
.main {
  flex: 1;
  width: 100%;
  padding: 35px 20px 20px 20px;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
}
</style>
